package it.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import it.service.ipml.ConstantIpml;

@Controller
public class PageController {

	@Autowired
	private ConstantIpml constantIpml;

	@RequestMapping("/")
	public String showPage(Model model) {
		String str = constantIpml.REGIST_EXPIRE_TIME;
		String[] strs = str.split("-");
		String dateStr = strs[0] + "," + (Integer.parseInt(strs[1]) - 1) + "," + strs[2];
		model.addAttribute("date", dateStr);
		model.addAttribute("info", constantIpml.PAGE_ROLL_INFO);
		model.addAttribute("title", constantIpml.MATCH_TITLE);
		return "regist";
	}

}
